import { Button, DatePicker, Select } from "antd";
import { Public } from ".."
import './index.less'
import { report } from "@/services/financialApi";
import { useEffect } from "react";
const { RangePicker } = DatePicker;
const handleChange = (value: string) => {
    console.log(`selected ${value}`);
};
const Reportz = () => {
    const reportData = () => {
        report({
            "acc_id": 0,
            "due_date": "",
            "pageNo": 1,
            "pageSize": 0,
            "sob_id": 1,
            "start_date": ""
        }).then((res) => {
            console.log(res);

        })
    }
    useEffect(() => {
        reportData()
    }, [])
    return (
        <div>
            <Public header={"资金报表"}></Public>
            {/* 搜索 */}
            <div className="from">
                <span className='name'>日期：</span><RangePicker />
                <span className='name'>账户：</span><Select
                    defaultValue="全部"
                    style={{ width: 140 }}
                    onChange={handleChange}
                    options={[
                        { value: 'jack', label: 'Jack' },
                        { value: 'lucy', label: 'Lucy' },
                        { value: 'Yiminghe', label: 'yiminghe' },
                    ]}
                />
                <button type="button" className="btn">搜索</button>
            </div>
            {/* 表格 */}
            <table className="tab">
                <thead>
                    <tr>
                        <th>编码</th>
                        <th>账户名称</th>
                        <th>初期余额</th>
                        <th>收入总额</th>
                        <th>支出总额</th>
                        <th>期末余额</th>
                        <th>收入笔数</th>
                        <th>支出笔数</th>
                    </tr>
                </thead>

                <tbody>
                    <tr>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                    </tr>
                </tbody>
                <tfoot>
                    <tr>
                        <td colSpan='2' className="foot-td">合计：</td>
                        {/* <td>1</td> */}
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                    </tr>
                </tfoot>
            </table>
            <table className="tab1">
                <tbody>
                    <tr>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                    </tr>
                </tbody>
                <tfoot>
                    <tr>
                        <td colSpan='2' className="foot-td">合计：</td>
                        {/* <td>1</td> */}
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                        <td>1</td>
                    </tr>
                </tfoot>
            </table>
        </div>
    )
}
export default Reportz